//用于获取当前时间(暂时未用)
var timestamp = Date.parse(new Date());
timestamp = timestamp / 1000;
//获取当前时间
const n = timestamp * 1000;
const date = new Date(n);
//年份
const year = date.getFullYear();
//月份
const month = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
//日
const day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
//时
const h = date.getHours();
//分
const m = date.getMinutes();
//秒
const s = date.getSeconds();

//获取年份
// const formatYear = date => {
//   const year = date.getFullYear()
//   return year;
// }
module.exports={
  formatYear, formatMonth, formatDay
}